package org.itcast.annotationandresttemplate;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 如果你有一些bean所在的包，不在main
 * app所在的包及其下级包中，
 * 那么你需要手动加上@ComponentScan注解并指定那个bean所在的包
 *
 * @MapperScan
 * 作用：指定要变成实现类的接口所在的包，
 * 然后包下面的所有接口在编译之后都会生成相应的实现类
 */
@EnableScheduling  // 开启任务调度
@EnableCaching // 开启缓存注解功能
@SpringBootApplication
@ComponentScan("org.itcast")
@MapperScan({"org.itcast.adi.*.dao","org.itcast.*.*.mapper"})
public class AnnotationAndRestTemplateApplication {

    public static void main(String[] args) {
        SpringApplication.run(AnnotationAndRestTemplateApplication.class, args);
    }

}
